import App from './App'

// #ifndef VUE3
import Vue from 'vue'
import * as api from 'common/api.js'
import * as util from 'common/util.js'

import uniPopup from '@dcloudio/uni-ui/lib/uni-popup/uni-popup.vue'
import uniPopupDialog from '@dcloudio/uni-ui/lib/uni-popup-dialog/uni-popup-dialog.vue'
// import uniFilePicker from '@dcloudio/uni-ui/lib/uni-file-picker/uni-file-picker.vue'
import uniTransition from '@dcloudio/uni-ui/lib/uni-transition/uni-transition.vue'
import uniIcons from '@dcloudio/uni-ui/lib/uni-icons/uni-icons.vue'
import zPaging from './components/z-paging/z-paging.vue'
import uniFilePicker from './components/uni-file-picker/uni-file-picker.vue'
import VueClipboard from 'vue-clipboard2'

Vue.use(VueClipboard);
Vue.component('z-paging', zPaging);
Vue.component('uni-transition', uniTransition);
Vue.component('uni-file-picker', uniFilePicker);
Vue.component('uni-icons', uniIcons);
Vue.component('uni-popup', uniPopup);
Vue.component('uni-popup-dialog', uniPopupDialog);

/*挂载全局请求接口*/
Vue.prototype.$api = api
/*挂载全局工具类*/
Vue.prototype.$util = util
Vue.config.productionTip = false

App.mpType = 'app'
const app = new Vue({
    ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif
